<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>随手快递</title>
    <link rel="stylesheet" type="text/css" href="../../AUI/css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../font-awesome/css/font-awesome.min.css" />
    <style type="text/css">
        .la {
            width: 100%;
            padding: 10px 20px;
            text-align: center;
        }
        input[type="text"], input[type="password"]{
            width:100%;
            height: 30px;
            border-bottom: 1px solid #bfbfbf;
            color: #626262;
            font-size: 15px;
            padding-left:10px ;
            margin: auto;
        }
    </style>
</head>
<body>
<header class="aui-bar aui-bar-nav" id="aui-header">
    <a class="aui-btn aui-pull-left" tapmode onclick="history.back();">
        <span class="aui-iconfont aui-icon-left"></span>
    </a>
    <div class="aui-title">密码设置</div>
    <div class="aui-btn aui-pull-right"></div>
</header>
<div class="aui-content" style="margin-top: 60px">
    <div class="la">
        <input type="password" placeholder="请输入密码" id="pwd">
    </div>
    <div class="la">
        <input type="password" placeholder="重新输入密码" id="pwd-c">
    </div>

</div>
<div style="clear: both;"></div>
<div  style="text-align: center;margin-top: 20px">
    <div class="aui-btn aui-btn-success" style="width: 90%;height: 35px;line-height: 35px;background: rgb(40, 174, 161)" id="submit" >提交</div></div>
</div>

<script type="text/javascript" src="../../myJs/jquery-1.12.1.min.js" ></script>
<script src="../../myJs/jquery.cookie.js"></script>
<script type="text/javascript" src="../../myJs/index.js" ></script>
<script>
    $("#submit").on("click",function(){
        var pwd = $("#pwd").val();
        var pwdc = $("#pwd-c").val();
        if(pwd==""){
            alertmd("请输入密码");
            return false;
        }

        if(pwdc==""){
            alertmd("请重新输入密码");
            return false;
        }
        if(pwd==pwdc){

            $.ajax({
            type: "post",
            url: '/randomdelivery/userLoginController/registerSuccess',
            data: {
            password:pwd
            },
            datatype: "json",
            success: function (data) {
            	 alert(JSON.stringify(data));
            	 location.href='../helpBuy/index.html';
            }

            });
          
        }else{
            alertmd("密码输入错误");
            $("#pwd").val("");
            $("#pwd-c").val("");
        }

    })

</script>
</body>
</html>